<template>
  <el-breadcrumb separator-class="el-icon-arrow-right">
    <el-breadcrumb-item v-for="(bread, index) in breadList" :key="bread.path">
      <router-link v-if="index == 0" to="/welcome">{{ bread.meta.title }}</router-link>
      <span v-else>{{ bread.meta.title }}</span>
    </el-breadcrumb-item>
  </el-breadcrumb>
</template>
<script>
export default {
  name: 'Breadcrumb',
  computed: {
    breadList() {
      return this.$route.matched;
    },
  },
};
</script>
